<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>学术资源管理平台</title>
	<link rel="stylesheet" type="text/css" href="../../../css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="../../../css/font-awesome.min.css">
	<link rel="stylesheet" type="text/css" href="../../../datatables/media/css/jquery.dataTables.min.css">
	<link rel="stylesheet" type="text/css" href="../../../datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.css">
	<link rel="stylesheet" type="text/css" href="../../../css/dateRange.css">
	<link rel="stylesheet" type="text/css" href="../../../css/global.css">
</head>
<body>
	<!-- InportModal -->
	<div class="modal fade sm-modal" id="myModalInport" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
					<span class="modal-title">上传文件</span>
				</div>
				<div class="modal-body">
					<form enctype="multipart/form-data" method="post" name="uploadForm">  
						<input type="file" class="btn btn-default" name="file" id="fff" />  
						<input type="button" class="btn btn-primary upLoadBtn" value="上传" onclick="doUpload()"  data-toggle="modal" data-target="#InputSuccess"  data-dismiss="modal"/>
					</form> 
					<a class="downloadTemplet" href="#">点此下载模板</a>
				</div>
			</div>
		</div>
	</div>

	<!-- InportSuccess -->
	<div class="modal fade sm-modal" id="InputSuccess" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-body">
					上传成功
				</div>
			</div>
		</div>
	</div>
	<!-- ExportModal -->
	<div class="modal fade sm-modal" id="myModalExport" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				</div>
				<div class="modal-body">
					...
				</div>
			</div>
		</div>
	</div>

	<div class="">
		<!-- 导航栏 -->
		<div class="navbar navbar-fixed-top scroll-hide">
			<!-- 顶上导航栏 -->
			<div class="container-fluid top-bar topnav"></div>
			<!-- 横向导航栏 -->
			<div id="main-nav" class="container-fluid main-nav"></div>
		</div>

		<div class="container-fluid">
			<div class="row">
				<!-- 侧边导航栏 -->
				<div id="sub-nav" class="col-md-2 subnav"></div>
				<div class="col-md-offset-2 mainContent" >
					<div class="InportExport">
						<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModalInport">导入</button>
						<!-- <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModalExport">导出</button> -->
						<div class="btn-group">
							<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
								导出 <span class="caret"></span>
							</button>
							<ul class="dropdown-menu">
								<li data-toggle="modal" data-target="#myModalInport"><a href="#">导出模板</a></li><li role="separator" class="divider"></li>
								<li data-toggle="modal" data-target="#myModalInport"><a href="#">导出全部数据</a></li><li role="separator" class="divider"></li>
								<li data-toggle="modal" data-target="#myModalInport"><a href="#">导出选中数据</a></li>
							</ul>
						</div>
					</div>
					<div class="accurateSelect">
						<div class="ta_date doubletime" id="div_date_double">
							<span class="date_title" id="date_double"></span>
							<a class="opt_sel" id="input_trigger_double" href="#">
								<i class="i_orderd"></i>
							</a>
						</div>
						<div class="ta_date singalTime" id="div_date_single">
							<span class="date_title" id="date_single"></span>
							<a class="opt_sel" id="input_trigger_single" href="#">
								<i class="i_orderd"></i>
							</a>
						</div>
					</div>
					<table class="table table-bordered" >
					</table>
				</div>
			</div>
		</div>
	</div>
	<footer class="footer navbar-fixed-bottom"></footer>


	<script type="text/javascript" src="../../../js/jquery-1.12.3.min.js"></script>
	<script type="text/javascript" src="../../../js/bootstrap.js"></script>
	<script type="text/javascript" src="../../../datatables/media/js/jquery.dataTables.min.js"></script>
	<!-- <script type="text/javascript" src="../../../js/global.js"></script> -->
	<script type="text/javascript" src="../../../js/index.js"></script>
	<script type="text/javascript" src="../../../js/dateRange.js"></script>
	<script type="text/javascript">
		var dateRange = new pickerDateRange('date_single', {
			// isSingleDay : true,
			calendars:1,
			isTodayValid: true,
			startDate: '请选择日期',
			// autoSubmit: true,
			inputTrigger: 'input_trigger_single',
			theme: 'ta',
			success: function(obj) {}
		});

		var dateRange = new pickerDateRange('date_double', {
			isTodayValid: true,
			startDate: '请选择日期区间',
			endDate: '',
			// autoSubmit: true,
			defaultText: ' 至 ',
			inputTrigger: 'input_trigger_double',
			theme: 'ta',
			success: function(obj) {}
		});

		function doUpload() {  
			var formData = new FormData($( "#uploadForm" )[0]);
			console.log(Request.Files["file"])
			console.log(formData.get("name"))
			alert($("input[name='file']").value)
			/*$.ajax({  
				url: 'http://123.206.190.167:8080/dissertation/excel/export' ,  
				type: 'POST',  
				// data: formData,
				data: {

				}  
				async: false,  
				cache: false,  
				contentType: false,  
				processData: false,  
				success: function (returndata) {  
					alert(returndata);  
				},  
				error: function (returndata) {  
					alert(returndata);  
				}  
			});  */
}  


$(function(){
			/*$.ajax({
				type: 'post',
				url: '',
				cache: false,
				data: new FormData($('#uploadForm')),
				async: true,
				processData: false,
				contentType: false,
				success:function(data){
					if (data.code == "200") {
						alert('导入成功');
						location.reload();
					}
					else{}
				},
			error: function(){
				alert('服务端异常');
			}
		});*/


})
</script>

</body>
</html>